#version 430

layout(location = 0)in vec3 axesPos;

uniform mat4 mvMatrix;
uniform mat4 projMatrix;

out vec4 color;

void main(void)
{
    gl_Position = projMatrix*mvMatrix*vec4(axesPos,1.0f);
    if(gl_VertexID==0||gl_VertexID==1){
        color = vec4(1.0f,0.0f,0.0f,1.0f);
    }
    else if(gl_VertexID==2||gl_VertexID==3){
        color = vec4(0.0f,1.0f,0.0f,1.0f);
    }
    else{
        color = vec4(0.0f,0.0f,1.0f,1.0f);
    }
}
